// import { Upload } from "@/api/interface/index";
// import { PORT1 } from "@/api/config/servicePort";
// import http from "@/api";
import {Customer, CustomerInfo} from "@/stores/modules/Customer";

const customer = Customer();
export {type CustomerInfo};
/**
 * @name 客户
 */
export const add = (info:CustomerInfo) => {
    return  new Promise((res)=>{
        setTimeout(()=>{
            customer.add(info)
            res(true);
        },2000);
    });

};
export const del = (index:number) => {
    return  new Promise((res)=>{
        setTimeout(()=>{
            customer.del(index)
            res(true);
        },2000);
    });

};
export const save = (index:number,info:CustomerInfo) => {
    return  new Promise((res)=>{
        setTimeout(()=>{
            customer.save(index,info)
            res(true);
        },2000);
    });

};
